<?php 

include "file_cache.php";

$url = 'http://hangzhoutuangou.appspot.com/image?';

$para_list = Array();
foreach($_GET as $key => $value){
	$para_list[] = $key . '=' . $value;
}
$url .=  implode('&', $para_list);

$cache = new JG_Cache('/usr/local/lxlabs/kloxo/httpdocs/cache', 3600);
$data = $cache->get($url);

if($data == false){
	include "curl_class.php";
	$cc = new cURL(); 
	$data =  $cc->get($url);
	$cache->set($url, $data);
}

header('Content-type: image/png');
echo $data;
?> 
